package net.xinqushi.io.output;

import java.io.*;

public class FileOutputStreamTest {

    public static void main(String[] args) {
        try {
            FileOutputStream fos = new FileOutputStream(TSET_FILE_NAME ,true);
            BufferedOutputStream bos = new BufferedOutputStream(fos);
            bos.write(" \n append content".getBytes());

            FileDescriptor fd = fos.getFD();
            fd.sync();//阻塞
            bos.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private final static String  TSET_FILE_NAME = "D:\\test\\test.txt";

}
